package com.legend.security;

/**
 * User: ChuanQi
 * Date: 13-6-1
 * Time: 下午3:34
 */
public enum PermissionShowType {
   none("不显示",0), menuBar("右键菜单栏", 2), toolBar("顶部工具栏", 4), List("当前列", 8);

    private PermissionShowType(String description, int value) {
        this.description = description;
        this.value = value;
    }

    private String description;
    private int value;

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getDescription() {
        for (PermissionShowType c : PermissionShowType.values()) {
            if (c.getValue() == value) {
                return c.description;
            }
        }
        return null;
    }

    public void setDescription(String name) {
        this.description = name;
    }
}
